package com.gjzhao.fmmall.service.feign;

import com.gjzhao.fmmall.entity.Users;
import com.gjzhao.fmmall.service.feign.fallback.UserCheckClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description: 用户查询客户端
 * @Author: gjzhao
 * @Date Created in 2022-02-12 11:33 下午
 */
@FeignClient(value = "fmmall-user-check", fallback = UserCheckClientFallback.class) //指定需要查询的服务、降级服务类
public interface UserCheckClient {

    @GetMapping("user/check")
    Users checkUser(@RequestParam("username") String username);
}
